﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SystemCenterSoa.ApiProject.Area.SystemManager;
using SystemCenterSoa.DtoModel.Common;
using SystemCenterSoa.PoModel.SystemSettings.CommonlyUsedSettings;
using SystemCenterSoa.Service.SystemSettings.CommonlyUsedSettings;

namespace SystemCenterSoa.ApiProject.Area.SystemSettings.CommonlyUsedSettings
{
    [AllowAnonymous]
    public class QuickLinkListController : SystemManagerBaseController
    {
        private QuickLinkListService _quickLinkListService;

        public QuickLinkListController(QuickLinkListService quickLinkListService)
        {
            _quickLinkListService = quickLinkListService;
        }

        [HttpPost]
        public ResultModel<int> QuickLinkListAdd(QuickLinkListPo form)
        {
             var data=  _quickLinkListService.QuickLinkListAdd(form);
            return MyOk(data);
        }

        [HttpPost]
        public ResultModel<int> QuickLinkListDelete(int id)
        {
           var data=_quickLinkListService.QuickLinkListDelete(id);
            return MyOk(data);
        }

        [HttpGet]
        public ResultModel<List<QuickLinkListPo>>  SearchPage()
        {
            var data=_quickLinkListService.SearchPage();
            return MyOk(data);
        }



    }
}
